package com.mp3.conf;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

import javax.sql.DataSource;

@Configuration
public class DruidConfiguration {

  @Bean
  public DataSource dataSource(Environment environment){
    return DruidDataSourceBuilder.create().build(environment,"spring.datasource.druid");
  }

}
